The present invention relates to a method and apparatus for remultiplexing packets that are provided at variable rates in digital bitstreams using a delay buffer and rate estimation. In particular, a bitstream is extracted from a multiplex and combined with other bitstreams in such a way that timing delivery constraints on the extracted bitstream are obeyed. For example, the invention is suitable for use at a cable television headend which grooms and remultiplexes digital transport streams that comply with the MPEG-2 standard.
The communication of digital video, audio, and other data has become increasingly common due to the improved fidelity, bandwidth efficiency, and versatility of digital signals relative to analog signals. For example, many cable television networks deliver digital television signals to users' homes via coaxial cable, or hybrid fiber and coaxial cable networks. Moreover, in addition to television signals, various other signals may be provided to the user, including audio only, video only, including still frame video, as well as data services, including Internet data, stock or weather data, computer games, and so forth. The provision of an upstream path from the user's home to the headend enables additional interactive capabilities.
The television or other data is transmitted from a headend of the cable network to a decoder at the user's home, and processed by the decoder to provide an output signal having a format that is compatible with the user's television, computer or other equipment.
The television or other data may be obtained by the headend via various methods. For example, the headend may have a local library of digital television programs or other data which is stored on magnetic storage media such as magnetic tape or computer disk drive, or optical storage media, such as compact disc, digital video disc, or laser disc. The headend may also receive digital television or other data from a transmission source, including, for example, a satellite distribution network, a terrestrial broadcast network, or a microwave distribution network.
Digital television data is provided in a format which is compatible with accepted industry standards. Currently, in the United States, one such standard is the MPEG-2 standard. In the future, high-definition television (HDTV) based on MPEG-2 is expected to become an industry standard.
The MPEG-2 standard provides strict timing and buffering requirements for the decoding of real-time data. For example, the decoder must be synchronized with the encoder. This is accomplished by providing a Program Clock Reference (PCR) field in the transport data stream. The PCR field essentially indicates the time when a packet of the data stream leaves the encoder. The decoder recovers and decodes the PCR field to determine the encoding time.
For buffering, the MPEG-2 standard requires the data rate of the transmitted data to be set such that the decoder buffer does not overflow or underflow. The decoder's buffer is modeled at the encoder in a Video Buffer Verifier (VBV) for this purpose. The encoder manipulates the encode rate (the rate at which digital data is produced by the encoder) and/or transmission rate such that at all times the decoder buffer does not overflow or underflow.
Accordingly, while an MPEG-2 packet has a fixed length (e.g., duration), the number of packets per second per source may vary such that the data source has a variable bit rate (VBR). Thus, the data rate of a data stream of such packets is fixed overall, but has packet components which are provided at relatively different rates or frequencies in the data stream. Moreover, streams of packets from different video or other sources are often time-multiplexed with one another to form one transport stream which is transmitted on a common carrier. The streams of packets from video and other sources may individually be variable bit rate (VBR), but the overall long term rate of the aggregate transport stream is usually fixed rate. Furthermore, several transport data streams may be transmitted to a headend concurrently on different carriers.
A data stream presents difficulties when one is required to remultiplex one or more VBR components from the data stream since the variable data rates of the components are not known. Only the aggregate rate is known. The individual rates of the constituents are unknown and vary continuously. Additionally, the remultiplexing task is made more difficult by the need to coordinate the timing of each of the different components.
Specifically, a remultiplexer receives one or more multiplexed or individual bitstreams as an input, extracts identified sub-components (e.g., stream of packets) from each input, and combines the extracted sub-components with other available bitstreams into a new output multiplexed bitstream (i.e., the remultiplexed data stream). Data from a local source, such as local storage media, video encoder, audio encoder, or other data source, may also be inserted into the remultiplexed data stream.
For example, a cable television headend may receive several transport streams, where each transport stream is a multiplex of packets from different video or other sources. However, it is often desired to transmit only a subset of the received packets to the users in the network due to bandwidth constraints, a tiered marketing scheme, or other programming requirements.
Accordingly, it would be desirable to provide a system for efficiently remultiplexing variable rate packets in a digital bitstream. The system should allow packets that are provided at a variable rate in a bitstream to be extracted from a received multiplex and combined with other bit streams in such a way that timing and buffer fullness constraints on the bitstream are obeyed. The system should also allow a local data source, such as one which is stored at a cable television headend, to be provided in the remultiplexed data stream.
The system should further be compatible with digital transport streams that comply with the MPEG-2 and similar communication standards wherein fixed length packets, VBR packet streams from each source, and a fixed rate multiplex are used. The system should also be compatible with compressed video, audio and other data.
The present invention provides a system having the above and other advantages.